The present invention relates to the field of computer system, and specially, relates to an apparatus and method and computer system for dynamically adjusting frequency of a central processing unit.
In the current computer system, a target value of a ratio of usage of CPU (Central Processing Unit) is generally set so that the CPU remains at a higher ratio of usage. Generally speaking, there are two choices in completing a same task in the computer system: one is running at a higher ratio of load (ratio of usage) of CPU with a lower frequency of CPU, the other is running at a lower ratio of load (ratio of usage) of CPU with a higher frequency of CPU. Since in the current computer system, the power consumption of the CPU is mainly related to the frequency thereof, i.e., is proportional to the square of the frequency thereof, that is, the lower the frequency of CPU is, the lower the power consumption is.
In recent years, the mainstream processors, for example, X86, ARM, etc. all support DVFS (Dynamic Voltage Frequency Scaling) technology. For example, in Linux system, there proposes a CPU control algorithm which is a dynamic scaling framework of the frequency of CPU based on the dynamic frequency scaling. In the method, there sets two thresholds of the frequency of CPU, and if the current ratio of usage of CPU is higher than the “high threshold”, the frequency of CPU is increased; if the current ratio of usage of CPU is lower than the “low threshold”, the frequency of CPU is decreased, so as to achieve the purpose of dynamically adjusting the frequency of CPU to reduce the power consumption.
However, with the complication of the computer system, there is a trend of further increase of the power consumption, thus, there still needs to research an apparatus and method for dynamically adjusting the frequency of CPU so that the power consumption is reduced.